#ifndef CONSTANT_PAD_CUSTOM_TILING_H
#define CONSTANT_PAD_CUSTOM_TILING_H

#include "register/tilingdata_base.h"

namespace optiling {
constexpr int32_t USE_MAX_CORE_NUM = 64; // default core count

// 数据类型标志位定义
enum DataTypeFlag {
    DT_UINT8  = 0,   // uint8类型
    DT_INT16  = 1,   // int16类型
    DT_INT32  = 2,   // int32类型
    DT_FLOAT16 = 3,  // half类型
    DT_FLOAT  = 4    // float类型
};

BEGIN_TILING_DATA_DEF(ConstantPadCustomTilingData)

    // 输入张量形状
    TILING_DATA_FIELD_DEF(int32_t, inputN);
    TILING_DATA_FIELD_DEF(int32_t, inputC);
    TILING_DATA_FIELD_DEF(int32_t, inputH);
    TILING_DATA_FIELD_DEF(int32_t, inputW);
    // 输出张量形状
    TILING_DATA_FIELD_DEF(int32_t, outputN);
    TILING_DATA_FIELD_DEF(int32_t, outputC);
    TILING_DATA_FIELD_DEF(int32_t, outputH);
    TILING_DATA_FIELD_DEF(int32_t, outputW);
    // 填充参数设置
    TILING_DATA_FIELD_DEF(int32_t, pad_left);
    TILING_DATA_FIELD_DEF(int32_t, pad_right);
    TILING_DATA_FIELD_DEF(int32_t, pad_top);
    TILING_DATA_FIELD_DEF(int32_t, pad_bottom);
    TILING_DATA_FIELD_DEF(float, pad_value);

    // 核间划分
    TILING_DATA_FIELD_DEF(int32_t, total_vectors);
    TILING_DATA_FIELD_DEF(int32_t, base_vectors_per_core);
    TILING_DATA_FIELD_DEF(int32_t, big_core_num);
    TILING_DATA_FIELD_DEF_ARR(int32_t, USE_MAX_CORE_NUM, core_vector_start);
    TILING_DATA_FIELD_DEF_ARR(int32_t, USE_MAX_CORE_NUM, core_vector_end);
    TILING_DATA_FIELD_DEF_ARR(int32_t, USE_MAX_CORE_NUM, core_vector_count);

    // 核内划分（tile）
    TILING_DATA_FIELD_DEF(int32_t, tile_vector_num);
    TILING_DATA_FIELD_DEF(int32_t, tile_compute_size);
    TILING_DATA_FIELD_DEF(int32_t, loop_times_compute);
    TILING_DATA_FIELD_DEF(int32_t, tail_compute);
    TILING_DATA_FIELD_DEF_ARR(int32_t, USE_MAX_CORE_NUM, core_loop_times_vector);
    TILING_DATA_FIELD_DEF_ARR(int32_t, USE_MAX_CORE_NUM, core_tail_vector);

    // 对齐与内存
    TILING_DATA_FIELD_DEF(int32_t, aligned_compute_size); // 对齐后的元素数
    TILING_DATA_FIELD_DEF(int32_t, bufferNum); // 通常2

    // 翻转相关辅助量
    TILING_DATA_FIELD_DEF(uint64_t, total_input_elements); 
    TILING_DATA_FIELD_DEF(uint64_t, total_output_elements); 

END_TILING_DATA_DEF;

REGISTER_TILING_DATA_CLASS(ConstantPadCustom, ConstantPadCustomTilingData)
} // namespace optiling
#endif // FLIP_CUSTOM_TILING_H